Optimal. Leaf size=42 \[ \frac {\cot ^2(a+b x)}{2 b}-\frac {\cot ^4(a+b x)}{4 b}+\frac {\log (\sin (a+b x))}{b} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 42, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3554, 3556}
\begin {gather*} -\frac {\cot ^4(a+b x)}{4 b}+\frac {\cot ^2(a+b x)}{2 b}+\frac {\log (\sin (a+b x))}{b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3554
Rule 3556
Rubi steps
\begin {align*} \int \cot ^5(a+b x) \, dx &=-\frac {\cot ^4(a+b x)}{4 b}-\int \cot ^3(a+b x) \, dx\\ &=\frac {\cot ^2(a+b x)}{2 b}-\frac {\cot ^4(a+b x)}{4 b}+\int \cot (a+b x) \, dx\\ &=\frac {\cot ^2(a+b x)}{2 b}-\frac {\cot ^4(a+b x)}{4 b}+\frac {\log (\sin (a+b x))}{b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.08, size = 46, normalized size = 1.10 \begin {gather*} \frac {2 \cot ^2(a+b x)-\cot ^4(a+b x)+4 \log (\cos (a+b x))+4 \log (\tan (a+b x))}{4 b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.04, size = 33, normalized size = 0.79
method | result | size |
derivativedivides | \(\frac {-\frac {\left (\cot ^{4}\left (b x +a \right )\right )}{4}+\frac {\left (\cot ^{2}\left (b x +a \right )\right )}{2}+\ln \left (\sin \left (b x +a \right )\right )}{b}\) | \(33\) |
default | \(\frac {-\frac {\left (\cot ^{4}\left (b x +a \right )\right )}{4}+\frac {\left (\cot ^{2}\left (b x +a \right )\right )}{2}+\ln \left (\sin \left (b x +a \right )\right )}{b}\) | \(33\) |
risch | \(-i x -\frac {2 i a}{b}-\frac {4 \left ({\mathrm e}^{6 i \left (b x +a \right )}-{\mathrm e}^{4 i \left (b x +a \right )}+{\mathrm e}^{2 i \left (b x +a \right )}\right )}{b \left ({\mathrm e}^{2 i \left (b x +a \right )}-1\right )^{4}}+\frac {\ln \left ({\mathrm e}^{2 i \left (b x +a \right )}-1\right )}{b}\) | \(77\) |
norman | \(\frac {-\frac {1}{64 b}+\frac {3 \left (\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{16 b}+\frac {3 \left (\tan ^{6}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{16 b}-\frac {\tan ^{8}\left (\frac {b x}{2}+\frac {a}{2}\right )}{64 b}}{\tan \left (\frac {b x}{2}+\frac {a}{2}\right )^{4}}+\frac {\ln \left (\tan \left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{b}-\frac {\ln \left (1+\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{b}\) | \(101\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.28, size = 38, normalized size = 0.90 \begin {gather*} \frac {\frac {4 \, \sin \left (b x + a\right )^{2} - 1}{\sin \left (b x + a\right )^{4}} + 2 \, \log \left (\sin \left (b x + a\right )^{2}\right )}{4 \, b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.41, size = 70, normalized size = 1.67 \begin {gather*} -\frac {4 \, \cos \left (b x + a\right )^{2} - 4 \, {\left (\cos \left (b x + a\right )^{4} - 2 \, \cos \left (b x + a\right )^{2} + 1\right )} \log \left (\frac {1}{2} \, \sin \left (b x + a\right )\right ) - 3}{4 \, {\left (b \cos \left (b x + a\right )^{4} - 2 \, b \cos \left (b x + a\right )^{2} + b\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.61, size = 61, normalized size = 1.45 \begin {gather*} \begin {cases} \frac {\log {\left (\sin {\left (a + b x \right )} \right )}}{b} + \frac {\cos ^{2}{\left (a + b x \right )}}{2 b \sin ^{2}{\left (a + b x \right )}} - \frac {\cos ^{4}{\left (a + b x \right )}}{4 b \sin ^{4}{\left (a + b x \right )}} & \text {for}\: b \neq 0 \\\frac {x \cos ^{5}{\left (a \right )}}{\sin ^{5}{\left (a \right )}} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 164 vs.
\(2 (38) = 76\).
time = 4.90, size = 164, normalized size = 3.90 \begin {gather*} -\frac {\frac {{\left (\frac {12 \, {\left (\cos \left (b x + a\right ) - 1\right )}}{\cos \left (b x + a\right ) + 1} + \frac {48 \, {\left (\cos \left (b x + a\right ) - 1\right )}^{2}}{{\left (\cos \left (b x + a\right ) + 1\right )}^{2}} + 1\right )} {\left (\cos \left (b x + a\right ) + 1\right )}^{2}}{{\left (\cos \left (b x + a\right ) - 1\right )}^{2}} + \frac {12 \, {\left (\cos \left (b x + a\right ) - 1\right )}}{\cos \left (b x + a\right ) + 1} + \frac {{\left (\cos \left (b x + a\right ) - 1\right )}^{2}}{{\left (\cos \left (b x + a\right ) + 1\right )}^{2}} - 32 \, \log \left (\frac {{\left | -\cos \left (b x + a\right ) + 1 \right |}}{{\left | \cos \left (b x + a\right ) + 1 \right |}}\right ) + 64 \, \log \left ({\left | -\frac {\cos \left (b x + a\right ) - 1}{\cos \left (b x + a\right ) + 1} + 1 \right |}\right )}{64 \, b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.42, size = 52, normalized size = 1.24 \begin {gather*} \frac {\ln \left (\mathrm {tan}\left (a+b\,x\right )\right )}{b}-\frac {\ln \left ({\mathrm {tan}\left (a+b\,x\right )}^2+1\right )}{2\,b}+\frac {\frac {{\mathrm {tan}\left (a+b\,x\right )}^2}{2}-\frac {1}{4}}{b\,{\mathrm {tan}\left (a+b\,x\right )}^4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________